load("//bazel:ray.bzl", "ray_cc_library")

ray_cc_library(
    name = "gcs_redis_client",
    srcs = [
        "redis_async_context.cc",
        "redis_client.cc",
        "redis_context.cc",
    ],
    hdrs = [
        "redis_async_context.h",
        "redis_client.h",
        "redis_context.h",
    ],
    deps = [
        "//:hiredis",
        "//src/ray/common:asio",
        "//src/ray/common:ray_config",
        "//src/ray/common:status",
        "//src/ray/stats:stats_lib",
        "//src/ray/util:exponential_backoff",
        "@boost//:asio",
    ],
)

ray_cc_library(
    name = "gcs_pb_util",
    srcs = ["pb_utils.cc"],
    hdrs = ["pb_util.h"],
    deps = [
        "//src/ray/common:constants",
        "//src/ray/common:id",
        "//src/ray/common:ray_config",
        "//src/ray/common:task_common",
        "//src/ray/protobuf:autoscaler_cc_proto",
        "//src/ray/protobuf:export_task_event_cc_proto",
    ],
)

ray_cc_library(
    name = "gcs_callback",
    hdrs = ["callback.h"],
    deps = [
        "//src/ray/common:status",
    ],
)

ray_cc_library(
    name = "gcs",
    deps = [
        ":gcs_callback",
        ":gcs_pb_util",
        ":gcs_redis_client",
        "//:node_manager_fbs",
        "//:node_manager_rpc",
    ],
)
